package com.hopu.aop.proxy;

/**
 * 电脑的门店代理商
 */
public class ComputerShop implements IComputerSell{

    //电脑工厂对象（被代理者）
    private IComputerSell miComputerFactory;

    //传入被代理者对象
    public ComputerShop(IComputerSell miComputerFactory){
        this.miComputerFactory = miComputerFactory;
    }

    @Override
    public void sellComputer() {
        //扩展功能
        System.out.println("给电脑打广告~~~~~~~~~~~");
        //调用被代理者方法
        miComputerFactory.sellComputer();
        System.out.println("给电脑做售后~~~~~~~~~~~");
    }
}
